Fully qualify std Result type#1025
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #1025 will improve performances by 7.07%Comparing Summary
Benchmarks breakdown
|
|
Thank you. Would you mind adding a test so that we catch future regressions early |
|
@MichaReiser sure, where would you want tests to be for this? Cursory review of the repo didn't show an obvious place with existing tests I should be augmenting. Want to make sure I'm as consistent with any existing practice as possible. |
|
To maybe be clearer, I think the test here would be a compilation success test, validating that the relevant macros can compile even if someone redefines |
The prior macro expansion could produce errors if the macros were called in a context where `Result` is redefined, for example in a crate with its own `Result` type which pre-fills the error type. This replaces existing `Result` uses with `std::result::Result` to avoid the compilation error in that case. Signed-off-by: Andrew Lilley Brinker <alilleybrinker@gmail.com>
08afee0 to
7c92bc2
Compare
|
Added a new "compile pass" test, and from it found some more spots that needed their use of |
|
Thank you |
The prior macro expansion could produce errors if the macros were called in a context where
Resultis redefined, for example in a crate with its ownResulttype which pre-fills the error type. This replaces existingResultuses withstd::result::Resultto avoid the compilation error in that case.